<?php
class YuzhiModel extends Action{
	//test
	//
	//############test
	public function getyuzhio($partid,$lineid){
		$info=collectinfo(__METHOD__,'$partid,$lineid',array($partid,$lineid));
		if(isset($partid)===false){return createarrerr('error_code','partid 不能为空',$info);}//防止NULL
		if(isset($lineid)===false){return createarrerr('error_code','lineid 不能为空',$info);}//防止NULL
		
		$yuzhi=M('yuzhi');
		$yuzhio=$yuzhi->where('f_yuzhi_partid='.$partid.' AND f_yuzhi_lineid='.$lineid)->find();



		return createarrok('ok',$yuzhio,'',$info);
	}

	public function getyuzhiobyyuzhiid($yuzhiid){
		$info=collectinfo(__METHOD__,'$yuzhiid',array($yuzhiid));
		if(isset($yuzhiid)===false){return createarrerr('error_code','yuzhiid 不能为空',$info);}//防止NULL
				
		$yuzhi=M('yuzhi');
		$yuzhio=$yuzhi->where('yuzhiid='.$yuzhiid)->find();



		return createarrok('ok',$yuzhio,'',$info);
	}
	

} 
?>